//
//  OMTViewController.m
//  OMTCoreKit
//
//  Created by 昭荣伊 on 07/26/2018.
//  Copyright (c) 2018 昭荣伊. All rights reserved.
//

#import "OMTViewController.h"
#import <OMTCoreKit/OMTCoreKit.h>


@interface OMTViewController ()

@end

@implementation OMTViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    {
        UILabel *label = [UILabel new];
        label.backgroundColor = HexColor(0xCD00CD);
        label.frame = CGRectMake(10, 88, 320, 44);
        NSString *url = @"http://www.baidu.com";
        NSDictionary *params = @{@"name":@"password", @"password":@"1password"};
        NSArray *array = @[@"name",@"123", @"password",@"中国人"];
        NSLog(@"url:%@", [UIDevice currentDevice].omt_UDID);
        label.text = [NSString stringWithFormat:@"omt_macAddress:%@", [url omt_URLParams]];
        [self.view addSubview:label];
    }
    
    {
        UILabel *label = [UILabel new];
        label.backgroundColor = [UIColor redColor];
        label.frame = CGRectMake(10, 130, 320, 44);
        // KB /MB / GB
        
        label.text = [NSString stringWithFormat:@"totalDiskSpace:%@", [OMTNumberFormatter fileSizeWithInterger:[UIDevice currentDevice].omt_totalDiskSpace]];
        [self.view addSubview:label];
    }
    
    {
        UILabel *label = [UILabel new];
        label.backgroundColor = [UIColor redColor];
        label.frame = CGRectMake(10, 176, 320, 44);
        label.text = [NSString stringWithFormat:@"freeDiskSpace:%@", [OMTNumberFormatter fileSizeWithInterger:[UIDevice currentDevice].omt_freeDiskSpace]];
        [self.view addSubview:label];
    }
    
    {
        UILabel *label = [UILabel new];
        label.backgroundColor = [UIColor redColor];
        label.frame = CGRectMake(10, 224, 320, 44);
        label.text = [NSString stringWithFormat:@"usedDiskSpace:%lld", [UIDevice currentDevice].omt_usedDiskSpace];
        [self.view addSubview:label];
    }
    
    {
        UILabel *label = [UILabel new];
        label.backgroundColor = [UIColor redColor];
        label.frame = CGRectMake(10, 260, 320, 44);
        label.text = [NSString stringWithFormat:@"totalMemory:%@", [OMTNumberFormatter fileSizeWithInterger:[UIDevice currentDevice].omt_totalMemory]];
        [self.view addSubview:label];
    }
    
}

@end
